<?php get_header(); ?>
<?php include 'main-menu.php'; ?>
<div class="container group">
   <?php get_sidebar(); ?>
   <div class="main-container">
      <!--Feature-->
      <?php include 'feature.php'; ?>
      <?php if (is_home()): ?>
         <script type="text/javascript" src="<?php bloginfo('template_url') ?>/skin1/js/wowslider.js"></script>
         <script type="text/javascript" src="<?php bloginfo('template_url') ?>/skin1/js/script.js"></script>
      <?php endif; ?>
      <?php include 'dich-vu.php'; ?>
      <!--Box Áo đôi-->
      <?php
      include 'my-config.php';
      $list_ao_doi_args = array(
          'post_status' => 'publish',
          'category__in' => array($ao_doi_category_id),
          'meta_key' => 'Vị trí hiển thị trên trang chủ',
          'orderby' => 'meta_value_num',
          'order' => 'ASC'
      );
      $query = new WP_Query($list_ao_doi_args);
      ?>
      <?php if ($query->posts): ?>
         <div class="box box-ao-doi group">
            <h2><a href="<?php bloginfo('url') ?>/ao-doi/" title="Áo Đôi">Áo Đôi</a></h2>
            <?php while ($query->have_posts()) : $query->the_post(); ?>
               <div class="item">
                  <?php the_post_thumbnail(array(211, 211, 'class' => ' img-intro')) ?>
                  <img class="item-bg" src="<?php bloginfo('template_url') ?>/skin1/images/item-ao-doi-bg.png" alt="#" />
                  <p class="item-info">
                     <?php
                     $ma_so = get_post_meta(get_the_ID(), "Mã số", true);
                     $gia = get_post_meta(get_the_ID(), "Giá", true);
                     ?>
                     <span class="ma-so">Mã số: <?php echo $ma_so ?></span><br />
                     <span class="ma-so">Giá: <?php echo $gia ?></span>
                  </p>
                  <?php edit_post_link('Edit', '<p>', '</p>'); ?>
               </div>
               <?php
            endwhile;
            wp_reset_postdata();
            ?>
         </div>
      <?php endif; ?>
      <!--End box-ao-doi-->
      <!--Box-ao-thun-nu-->
      <?php
      $list_ao_nu_args = array(
          'post_status' => 'publish',
          'category__in' => array($ao_nu_category_id),
          'meta_key' => 'Vị trí hiển thị trên trang chủ',
          'orderby' => 'meta_value_num',
          'order' => 'ASC'
      );
      $query = new WP_Query($list_ao_nu_args);
      ?>
      <?php if ($query->posts): ?>
         <div class="box box-ao-thun-nu group">
            <h2><a href="<?php bloginfo('url') ?>/ao-thun-nu/" title="Áo Thun Nữ">Áo Thun Nữ</a></h2>
            <?php while ($query->have_posts()) : $query->the_post(); ?>
               <div class="item">
                  <?php the_post_thumbnail(array(211, 211, 'class' => ' img-intro')) ?>
                  <img class="item-bg" src="<?php bloginfo('template_url') ?>/skin1/images/item-ao-thun-nu-bg.png" alt="#" />
                  <p class="item-info">
                     <?php
                     $ma_so = get_post_meta(get_the_ID(), "Mã số", true);
                     $gia = get_post_meta(get_the_ID(), "Giá", true);
                     ?>
                     <span class="ma-so">Mã số: <?php echo $ma_so ?></span><br />
                     <span class="ma-so">Giá: <?php echo $gia ?></span>
                  </p>
                  <?php edit_post_link('Edit', '<p>', '</p>'); ?>
               </div>
               <?php
            endwhile;
            wp_reset_postdata();
            ?>
         </div>
      <?php endif; ?>
      <!--End box-ao-thun-nu-->
      <!--Box-ao-thun-nam-->
      <?php
      $list_ao_nam_args = array(
          'post_status' => 'publish',
          'category__in' => array($ao_nam_category_id),
          'meta_key' => 'Vị trí hiển thị trên trang chủ',
          'orderby' => 'meta_value_num',
          'order' => 'ASC'
      );
      $query = new WP_Query($list_ao_nam_args);
      ?>
      <?php if ($query->posts): ?>
         <div class="box box-ao-thun-nam group">
            <h2><a href="<?php bloginfo('url') ?>/ao-thun-nam/" title="Áo Thun Nam">Áo Thun Nam</a></h2>
            <?php while ($query->have_posts()) : $query->the_post(); ?>
               <div class="item">
                  <?php the_post_thumbnail(array(211, 211, 'class' => ' img-intro')) ?>
                  <img class="item-bg" src="<?php bloginfo('template_url') ?>/skin1/images/item-ao-thun-nam-bg.png" alt="#" />
                  <p class="item-info">
                     <?php
                     $ma_so = get_post_meta(get_the_ID(), "Mã số", true);
                     $gia = get_post_meta(get_the_ID(), "Giá", true);
                     ?>
                     <span class="ma-so">Mã số: <?php echo $ma_so ?></span><br />
                     <span class="ma-so">Giá: <?php echo $gia ?></span>
                  </p>
                  <?php edit_post_link('Edit', '<p>', '</p>'); ?>
               </div>
               <?php
            endwhile;
            wp_reset_postdata();
            ?>
         </div>
      <?php endif; ?>
      <!--End box-ao-thun-nam-->
      <!--Box-dong-phuc-hoc-sinh-->
      <?php
      $list_dong_phuc_hoc_sinh_args = array(
          'post_status' => 'publish',
          'category__in' => array($dong_phuc_hoc_sinh_category_id),
          'meta_key' => 'Vị trí hiển thị trên trang chủ',
          'orderby' => 'meta_value_num',
          'order' => 'ASC'
      );
      $query = new WP_Query($list_dong_phuc_hoc_sinh_args);
      ?>
      <?php if ($query->posts): ?>
         <div class="box box-dong-phuc-hoc-sinh group">
            <h2><a href="<?php bloginfo('url') ?>/dong-phuc-hoc-sinh/" title="Đồng Phục Học Sinh">Đồng Phục Học Sinh</a></h2>
            <?php while ($query->have_posts()) : $query->the_post(); ?>
               <div class="item">
                  <?php the_post_thumbnail(array(211, 211, 'class' => ' img-intro')) ?>
                  <img class="item-bg" src="<?php bloginfo('template_url') ?>/skin1/images/item-dong-phuc-hoc-sinh-bg.png" alt="#" />
                  <?php edit_post_link('Edit', '<p>', '</p>'); ?>
               </div>
               <?php
            endwhile;
            wp_reset_postdata();
            ?>
         </div>
      <?php endif; ?>
      <!--End box-dong-phuc-hoc-sinh-->
      <!--Box-may-theo-yeu-cau-->
      <?php
      $list_may_theo_yeu_cau_args = array(
          'post_status' => 'publish',
          'category__in' => array($ao_may_theo_yeu_cau_category_id),
          'meta_key' => 'Vị trí hiển thị trên trang chủ',
          'orderby' => 'meta_value_num',
          'order' => 'ASC'
      );
      $query = new WP_Query($list_may_theo_yeu_cau_args);
      ?>
      <?php if ($query->posts): ?>
         <div class="box box-may-theo-yeu-cau group">
            <h2><a href="<?php bloginfo('url') ?>/may-in-theo-yeu-cau/" title="May In Theo Yêu Cầu">May In Theo Yêu Cầu</a></h2>
            <?php while ($query->have_posts()) : $query->the_post(); ?>
               <div class="item">
                  <?php the_post_thumbnail(array(211, 211, 'class' => ' img-intro')) ?>
                  <img class="item-bg" src="<?php bloginfo('template_url') ?>/skin1/images/item-may-theo-yeu-cau-bg.png" alt="#" />
                  <?php edit_post_link('Edit', '<p>', '</p>'); ?>
               </div>
               <?php
            endwhile;
            wp_reset_postdata();
            ?>
         </div>
      <?php endif; ?>
      <!--End Box-may-theo-yeu-cau-->
   </div>
   <!--main-container-->
</div>
<?php get_footer(); ?>